import os


def file_name(file_dir):
    for root, dirs, files in os.walk(file_dir):
        for file in files:
            if os.path.splitext(file)[1] == ".py":
                os.remove(file_dir + "\\" + file)


if __name__ == '__main__':
    file_name(os.path.abspath(".") + "\\report")
    file_name(os.path.abspath(".") + "\\reportpdf")
